from django.urls import path, include
from pfmea_file_manage import views
from rest_framework.routers import DefaultRouter

router = DefaultRouter()
router.register(prefix="viewset/pfmea_table_info_list", viewset=views.pfmea_table_infoViewSet)
router.register(prefix="viewset/pfmea_table_data_list", viewset=views.pfmea_table_dataViewSet)

urlpatterns = [
    path("get_op_info/", views.OpInfoView.as_view()),
    path("get_op_data/", views.get_pfmea_dataView.as_view()),
    path("upload_pfmea_file/", views.data_manage_UploadView.as_view()),
    path("insert_pfmea_data/", views.insert_pfmea_dataView.as_view()),
    path("edite_pfmea_data/", views.edite_pfmea_dataView.as_view()),
    path("delete_pfmea_data/", views.delete_pfmea_dataView.as_view()),
]
# 使用视图集编程 Viewset（写法三）
urlpatterns += router.urls
